package com.xiaoyu.awakening.user.enums;

import com.xiaoyu.awakening.common.core.exception.status.IReturnCode;
import com.xiaoyu.awakening.user.constant.SystemConstant;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 业务错误码枚举
 *
 * @author wangxiaoyu
 * @since v1.0
 */
@Getter
@AllArgsConstructor
public enum UserErrorCodeEnums implements IReturnCode {
    //用户名错误
    USER_NAME_ERROR("000", "用户名错误", IReturnCode.BUSINESS_PREFIX),
    //登录错误
    USER_LOGIN_ERROR("001", "用户登录错误", IReturnCode.BUSINESS_PREFIX);
    final String code;
    final String message;
    final String series;

    @Override
    public String getMessage() {
        return this.message;
    }

    @Override
    public String getCode() {
        return this.series + SystemConstant.SERVICE_CODE + this.code;
    }
}
